<#import "/META-INF/spring.ftl" as spring />
<#import "/META-INF/mspring.ftl" as mspring />
<#include "../../inc/header.ftl" />
<form id="newsCatalogForm" name="newsCatalogForm" action="${base}/admin/news/catalog/list" method="POST">
	<@spring.bind "newsCatalog" />
	<table>
		<tr>
			<td class="fieldlabel" style="width:65px;">分类名称：</td>
			<td>
				<@spring.formInput path="newsCatalog.name" attributes='class="textinput"' />
			</td>
			<td><input type="submit" class="btn" value=" 查 询 " /></td>
		</tr>
	</table>
		
	<@spring.bind "newsCatalogPage" />
	<!-- pagination parameter -->
	<@spring.formHiddenInput path="newsCatalogPage.pageNo" />
	<@spring.formHiddenInput path="newsCatalogPage.totalPages" />
	<@spring.formHiddenInput path="newsCatalogPage.totalCount" />
	<!-- sorter parameter -->
	<@spring.formHiddenInput path="newsCatalogPage.sortEnable" />
	<@spring.formHiddenInput path="newsCatalogPage.sort.field" />
	<@spring.formHiddenInput path="newsCatalogPage.sort.order" />
	<table class="dtable" cellspacing="0" cellpadding="0">
		<tr>
			<th><input type="checkbox" onclick="mlog.form.checkAll(this, 'id');" /></th>
			<th onclick="sortField(this, 'newsCatalogForm', 'id');" id='id_sort'>编号</th>
			<th onclick="sortField(this, 'newsCatalogForm', 'name');" id='name_sort'>名称</th>
			<th onclick="sortField(this, 'newsCatalogForm', 'createTime');" id='createTime_sort'>创建时间</th>
			<th>操作</th>
		</tr>
		<#if newsCatalogPage?exists && newsCatalogPage.result?exists>
			<#list newsCatalogPage.result as item>
				<#assign tdClass = "odd">
				<#if item_index%2 == 0>
					<#assign tdClass = "even">
				</#if>
				<tr>
					<td class="${tdClass}"><input type="checkbox" name="id" value="${item.id}" /></td>
					<td class="${tdClass}">${item.id}</td>
					<td class="${tdClass}">${item.name}</td>
					<td class="${tdClass}">${item.createTime}</td>
					<td class="${tdClass}">
						<input type="hidden" name="ids" value="${item.id}" />
						<a href="${base}/admin/news/catalog/edit?id=${item.id}">修改</a>
					</td>
				</tr>
			</#list>
		</#if>
	</table>
	<table style="width:100%;">
		<tr>
			<td>
				<input type="button" class="btn" value=" 提交 " onclick="mlog.form.confirmSubmit('newsCatalogForm', '${base}/admin/news/catalog/delete', '确定要删除选定分类吗？');" />
			</td>
			<td>
				<@mspring.pagingnavigator page=newsCatalogPage form_id="newsCatalogForm" />
			</td>
		</tr>
	</table>
</form>
<#include "../../inc/footer.ftl" />